//
//  PLine.h
//  ProjectL
//
//  Created by Nguyen Tan Loc on 8/16/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "CCSprite.h"
#import "PNode.h"

typedef enum
{
    eLS_IDLE = 0,
    eLS_CONTECTED,
    eLS_SPREADED,
} eLineState;

@interface PLine : CCSprite
{
    CGPoint *mVertices;
    CGPoint *mCoordinates;
    ccColor4F *mColors;
    
    PNode *mNode;
    BOOL mInverse;
    
    eLineState mState;
}

@property (nonatomic, assign) PNode *_node;
@property (nonatomic, assign) BOOL _inverse;

-(id) initWithNode:(PNode *)node;
-(void) updateLine;
-(void) updateRealtime;
-(void) spread;
-(void) setLineState:(eLineState)state;
-(void) reset;
-(CGPoint) getPosWithPercent:(float)percent;

@end
